package io.jpress.commons.utils;

import com.jfinal.plugin.activerecord.Record;

public class RecordUtil {

    public static Record createRecord(Object ... keyAndValues){
        Record ret  = new Record();
        for (int i = 0; i < keyAndValues.length; i=i+2) {
            Object key = keyAndValues[i];
            Object value = keyAndValues[i+1];
            ret.put(String.valueOf(key),value);
        }
        return ret;
    }
}
